package net.cityside.summer.commons;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	static final String dateTimeFormatString = "yyyy-MM-dd HH:mm:ss z";

	private static ThreadLocal<SimpleDateFormat> dateFormatTL = new ThreadLocal<SimpleDateFormat>() {
		protected SimpleDateFormat initialValue() {
			return new SimpleDateFormat(dateTimeFormatString);
		};
	};

	public static Date bulidDateTime(String dateString) throws ParseException {
		return dateFormatTL.get().parse(dateString);
	}

}
